#include <stdio.h>
int power(int x, int n) {
    if (n == 0) return 1;
    if (n % 2)
        return x * power(x, n - 1);
    return power(x, n / 2) * power(x, n / 2);
}
int main(void)
{
    int x, n;
    printf("输入底数x和指数n：");
    scanf("%d %d", &x, &n);
    printf("%d^%d = %d\n", x, n, power(x, n));
    return 0;
}